package org.javahispano.javacup.tacticas_aceptadas.FGR.javacup2009.gallegux.javacup2009.canelaenrama.ed;

import java.util.Comparator;


public class IntDouble implements Comparator<IntDouble> , Comparable<IntDouble>
{

	public int intValue = 0;
	public double doubleValue = 0;
	
	
	
	
	
	public IntDouble(int intValue, double doubleValue ) {
		super();
		this.doubleValue = doubleValue;
		this.intValue = intValue;
	}






	public int compare(IntDouble o1, IntDouble o2) {
		return new Double(o1.doubleValue)
			.compareTo(new Double(o2.doubleValue));
	}
	
	
	
	public boolean equals(Object obj)
	{
		return (obj instanceof IntDouble) && (obj != null) 
			&& ((IntDouble) obj).doubleValue == doubleValue;
	}
	


	@Override
	public int compareTo(IntDouble o) {
		// TODO Auto-generated method stub
		return compare(this, o);
	}

	

}
